package com.charactereducatio.order.service;

import com.charactereducation.module.vo.User;
import com.charactereducation.tools.myRunTime.MyRunTimeExcption;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created by Baggio on 2018-6-25.
 */
@FeignClient(name = "service-userCenter")
public interface UserServiceClient {

    @PostMapping(value = "/user/login")
    User login(@RequestParam("phone") String phone, @RequestParam("passWord") String passWord) throws MyRunTimeExcption;

    @PostMapping(value = "/user/modify")
    void addUser(@RequestBody User user) throws MyRunTimeExcption;

    @GetMapping(value = "/user/{id}")
    User getUserById(@PathVariable("id") Long id) throws MyRunTimeExcption;
}
